package com.atguigu.tingshu.user.service;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import com.atguigu.tingshu.vo.user.UserPaidRecordVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface UserInfoService extends IService<UserInfo> {

    /**
     * 小程序授权登录
     * @param code
     * @return
     */
    Map<String, String> wxLogin(String code);

    UserInfoVo getUserInfo(Long userId);

    void updateUser(UserInfoVo userInfoVo);

    /**
     * 获取用户声音列表付费情况
     * /api/user/userInfo/userIsPaidTrack/{userId}/{albumId}
     */
    Map<Long, Integer> userIsPaidTrack(Long userId, Long albumId,List<Long>needChackTrackIdList);

    /**
     * 判断用户是否购买过指定专辑
     * /api/user/userInfo/isPaidAlbum/{albumId}
     * @param albumId
     * @return
     */
    Boolean isPaidAlbum(Long albumId, Long userId);

    /**
     * 根据专辑id+用户ID获取用户已购买声音id列表
     * /api/user/userInfo/findUserPaidTrackList/{albumId}
     * @param albumId
     * @return
     */
    List<Long> findUserPaidTrackList(Long albumId, Long userId);
    /**
     * 虚拟发货
     * /api/user/userInfo/savePaidRecord
     * @param
     * @return
     */
    void savePaidRecord(UserPaidRecordVo userPaidRecordVo);
}
